import { request } from '@ruifox-cms/utils'

// 根据pid查询栏目列表
export function getCategoryList(params) {
    return request({
        url: '/station/api/category/getCategoryList',
        method: 'get',
        params
    })
}
// 获取所有栏目
export function getAllCategory(params) {
    return request({
        url: '/station/api/category/selectList',
        method: 'get',
        params
    })
}
// 添加栏目
export function insertCategory(data) {
    return request({
        url: '/station/api/category/insert',
        method: 'post',
        data
    })
}
// 修改栏目
export function updateCategory(data) {
    return request({
        url: '/station/api/category/update',
        method: 'post',
        data
    })
}
// 复制栏目
export function copyCategoryBatch(data) {
    return request({
        url: '/station/api/category/batchCopy',
        method: 'post',
        data
    })
}
// 删除栏目
export function deleteCategory(data) {
    return request({
        url: '/station/api/category/delete',
        method: 'post',
        data
    })
}
// 批量删除栏目
export function deleteCategoryList(data) {
    return request({
        url: '/station/api/category/deleteList',
        method: 'post',
        data
    })
}
// 获取栏目信息
export function getCategoryDetail(params) {
    return request({
        url: '/station/api/category/selectById',
        method: 'get',
        params
    })
}
// 根据模型id查询所有栏目(完整路径)
export function getCategoryByModelId(params) {
    return request({
        url: '/station/api/category/selectByModelId',
        method: 'get',
        params
    })
}
// 修改栏目排序
export function updateSort(data) {
    return request({
        url: '/station/api/category/updateSort',
        method: 'post',
        data
    })
}
// 根据模型siteId查询所有科室
export function selectDepart(params) {
    return request({
        url: '/station/api/category/selectDepart',
        method: 'get',
        params
    })
}
